<template>
<div>
    Dialog 对话框
    <div>
        <el-button type="text" @click="dialogVisible = true">点击打开 Dialog</el-button>

        <el-dialog
        title="提示"
        :visible.sync="dialogVisible"
        width="30%"
        :before-close="handleClose">
        <span>这是一段信息</span>
        <span slot="footer" class="dialog-footer">
            <el-button @click="dialogVisible = false">取 消</el-button>
            <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
        </span>
        </el-dialog>
    </div>

    Tooltip 文字提示
    <div>
        <div class="box">
            <div class="top">
                <el-tooltip class="item" effect="dark" content="Top Left 提示文字" placement="top-start">
                <el-button>上左</el-button>
                </el-tooltip>
                <el-tooltip class="item" effect="dark" content="Top Center 提示文字" placement="top">
                <el-button>上边</el-button>
                </el-tooltip>
                <el-tooltip class="item" effect="dark" content="Top Right 提示文字" placement="top-end">
                <el-button>上右</el-button>
                </el-tooltip>
            </div>
            <div class="left">
                <el-tooltip class="item" effect="dark" content="Left Top 提示文字" placement="left-start">
                <el-button>左上</el-button>
                </el-tooltip>
                <el-tooltip class="item" effect="dark" content="Left Center 提示文字" placement="left">
                <el-button>左边</el-button>
                </el-tooltip>
                <el-tooltip class="item" effect="dark" content="Left Bottom 提示文字" placement="left-end">
                <el-button>左下</el-button>
                </el-tooltip>
            </div>

            <div class="right">
                <el-tooltip class="item" effect="dark" content="Right Top 提示文字" placement="right-start">
                <el-button>右上</el-button>
                </el-tooltip>
                <el-tooltip class="item" effect="dark" content="Right Center 提示文字" placement="right">
                <el-button>右边</el-button>
                </el-tooltip>
                <el-tooltip class="item" effect="dark" content="Right Bottom 提示文字" placement="right-end">
                <el-button>右下</el-button>
                </el-tooltip>
            </div>
            <div class="bottom">
                <el-tooltip class="item" effect="dark" content="Bottom Left 提示文字" placement="bottom-start">
                <el-button>下左</el-button>
                </el-tooltip>
                <el-tooltip class="item" effect="dark" content="Bottom Center 提示文字" placement="bottom">
                <el-button>下边</el-button>
                </el-tooltip>
                <el-tooltip class="item" effect="dark" content="Bottom Right 提示文字" placement="bottom-end">
                <el-button>下右</el-button>
                </el-tooltip>
            </div>
            </div>
    </div>

    Popover 弹出框
    <div>
        <template>
            <el-popover
                placement="top-start"
                title="标题"
                width="200"
                trigger="hover"
                content="这是一段内容,这是一段内容,这是一段内容,这是一段内容。">
                <el-button slot="reference">hover 激活</el-button>
            </el-popover>

            <el-popover
                placement="bottom"
                title="标题"
                width="200"
                trigger="click"
                content="这是一段内容,这是一段内容,这是一段内容,这是一段内容。">
                <el-button slot="reference">click 激活</el-button>
            </el-popover>

            <el-popover
                ref="popover"
                placement="right"
                title="标题"
                width="200"
                trigger="focus"
                content="这是一段内容,这是一段内容,这是一段内容,这是一段内容。">
            </el-popover>
            <el-button v-popover:popover>focus 激活</el-button>

            <el-popover
                placement="bottom"
                title="标题"
                width="200"
                trigger="manual"
                content="这是一段内容,这是一段内容,这是一段内容,这是一段内容。"
                v-model="visible">
                <el-button slot="reference" @click="visible = !visible">手动激活</el-button>
            </el-popover>
            </template>
    </div>

    Popconfirm 气泡确认框
    <template>
        <el-popconfirm
        title="这是一段内容确定删除吗？"
        >
        <el-button slot="reference">删除</el-button>
        </el-popconfirm>
    </template>

    Card 卡片
    <div>
        <el-card class="box-card">
            <div slot="header" class="clearfix">
                <span>卡片名称</span>
                <el-button style="float: right; padding: 3px 0" type="text">操作按钮</el-button>
            </div>
            <div v-for="o in 4" :key="o" class="text item">
                {{'列表内容 ' + o }}
            </div>
            </el-card>
    </div>

Carousel 走马灯
    <div>
        <template>
            <div class="block">
                <span class="demonstration">默认 Hover 指示器触发</span>
                <el-carousel height="150px">
                <el-carousel-item v-for="item in 4" :key="item">
                    <h3 class="small">{{ item }}</h3>
                </el-carousel-item>
                </el-carousel>
            </div>
            <div class="block">
                <span class="demonstration">Click 指示器触发</span>
                <el-carousel trigger="click" height="150px">
                <el-carousel-item v-for="item in 4" :key="item">
                    <h3 class="small">{{ item }}</h3>
                </el-carousel-item>
                </el-carousel>
            </div>
        </template>
    </div>

    Collapse 折叠面板
    <div>
        <el-collapse v-model="activeNames" @change="handleChange">
        <el-collapse-item title="一致性 Consistency" name="1">
            <div>与现实生活一致：与现实生活的流程、逻辑保持一致，遵循用户习惯的语言和概念；</div>
            <div>在界面中一致：所有的元素和结构需保持一致，比如：设计样式、图标和文本、元素的位置等。</div>
        </el-collapse-item>
        <el-collapse-item title="反馈 Feedback" name="2">
            <div>控制反馈：通过界面样式和交互动效让用户可以清晰的感知自己的操作；</div>
            <div>页面反馈：操作后，通过页面元素的变化清晰地展现当前状态。</div>
        </el-collapse-item>
        <el-collapse-item title="效率 Efficiency" name="3">
            <div>简化流程：设计简洁直观的操作流程；</div>
            <div>清晰明确：语言表达清晰且表意明确，让用户快速理解进而作出决策；</div>
            <div>帮助用户识别：界面简单直白，让用户快速识别而非回忆，减少用户记忆负担。</div>
        </el-collapse-item>
        <el-collapse-item title="可控 Controllability" name="4">
            <div>用户决策：根据场景可给予用户操作建议或安全提示，但不能代替用户进行决策；</div>
            <div>结果可控：用户可以自由的进行操作，包括撤销、回退和终止当前操作等。</div>
        </el-collapse-item>
        </el-collapse>
    </div>

Timeline 时间线
    <div>
        <div class="block">
            <div class="radio">
                排序：
                <el-radio-group v-model="reverse">
                <el-radio :label="true">倒序</el-radio>
                <el-radio :label="false">正序</el-radio>
                </el-radio-group>
            </div>

            <el-timeline :reverse="reverse">
                <el-timeline-item
                v-for="(activity, index) in activities"
                :key="index"
                :timestamp="activity.timestamp">
                {{activity.content}}
                </el-timeline-item>
            </el-timeline>
            </div>
    </div>

    Divider 分割线
    <div>
        <template>
            <div>
                <span>青春是一个短暂的美梦, 当你醒来时, 它早已消失无踪</span>
                <el-divider></el-divider>
                <span>少量的邪恶足以抵消全部高贵的品质, 害得人声名狼藉</span>
            </div>
            </template>
    </div>

    Calendar calendar
    <div>
        <el-calendar v-model="value">
        </el-calendar>
    </div>
      
    Image 图片
    <div>
       <div class="demo-image">
            <div class="block" v-for="fit in fits" :key="fit">
                <span class="demonstration">{{ fit }}</span>
                <el-image
                style="width: 100px; height: 100px"
                :src="url"
                :fit="fit"></el-image>
            </div>
            </div> 
    </div>
Backtop 回到顶部
    <template>
        Scroll down to see the bottom-right button.
        <el-backtop target=".page-component__scroll .el-scrollbar__wrap"></el-backtop>
    </template>

    <!-- InfiniteScroll 无限滚动
    <template>
        <ul class="infinite-list" v-infinite-scroll="load" style="overflow:auto">
            <li v-for="i in count" class="infinite-list-item">{{ i }}</li>
        </ul>
        </template> -->
Drawer 抽屉
<div>
        <el-radio-group v-model="direction">
        <el-radio label="ltr">从左往右开</el-radio>
        <el-radio label="rtl">从右往左开</el-radio>
        <el-radio label="ttb">从上往下开</el-radio>
        <el-radio label="btt">从下往上开</el-radio>
        </el-radio-group>

        <el-button @click="drawer = true" type="primary" style="margin-left: 16px;">
        点我打开
        </el-button>

        <el-drawer
        title="我是标题"
        :visible.sync="drawer"
        :direction="direction"
        :before-close="handleClose">
        <span>我来啦!</span>
        </el-drawer>
</div>


</div>
</template>


<script>

export default {
name:'elementUIothers',
components:{

},
date(){
    return{
        dialogVisible:false,
        visible: false,
        activeNames: ['1'],
        value: new Date(),
        fits: ['fill', 'contain', 'cover', 'none', 'scale-down'],
        url: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg',
        count: 0,
        drawer: false,
        direction: 'rtl',
        } 
},
methods: {
      handleClose(done) {
        this.$confirm('确认关闭？')
          .then(() => {
            done();
          })
          .catch(() => {});
      },
      handleChange(val) {
        console.log(val);
      },
      load () {
        this.count += 2
      }
    },
      created(){

  },
  mounted(){

  }
}
</script>